package com.bolang.onlycode.demo.designPatterns.decorator;

public class DecoratorTest {
    public static void main(String[] args) {
        ImikeTea man = new MikeMakeImpl();
        ConcreteCreamMilkTea md1 = new ConcreteCreamMilkTea(man);
        ConcretePearlMilkTea md2 = new ConcretePearlMilkTea(man);

        // 椰奶奶茶
        md1.makeMilkTea();
        System.out.println();
        // 珍珠奶茶
        md2.makeMilkTea();
        System.out.println();
        // 珍珠椰奶奶茶
        md1.setImikeTea(md2);
        md1.makeMilkTea();
    }
}
